<?php

class HtmlExportController extends CController {
	public $breadcrumbs;
	public $layout='/layouts/column1';
	
	public function actionExport() {
		$model = new HtmlExportModel();
		if(isset($_POST['HtmlExportModel'])) {
			$model->attributes = $_POST['HtmlExportModel'];
			$time = new Timer();
			if($model->export()) {
				Yii::app()->user->setFlash(
					FLASH::OP_RESULT_SUCCESS, 
					'操作成功，总耗时：'.$time->end()." ({$time->unit})"
				);
				$this->refresh();
			}
		}
		$this->render('export', array('model' => $model));
	}

}

?>